
#include "qotd.h"
#include <string.h>

#define QUOTE "An apple a day, keeps doctor away."

QotdConnHandler::QotdConnHandler()
{
}

QotdConnHandler::~QotdConnHandler()
{
}

ConnectionHandler* QotdConnHandler::CreateInstance()
{
    return new QotdConnHandler();
}

void QotdConnHandler::HandleConnection(fasmio::fiber_env::ITCPSocket* sock, const char* addr)
{
    sock->SendAll(QUOTE, strlen(QUOTE));
    sock->Shutdown(SHUT_RDWR);
}

